package com.ruoyi.project.monitor.job.task;

import com.ruoyi.project.bajiaostar.tGoodOrder.service.ITGoodOrderService;
import com.ruoyi.project.push.AppPush;
import com.ruoyi.project.sms.ISMSService;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;

import java.io.IOException;
import java.util.concurrent.ThreadPoolExecutor;


/**
 * 定时任务调度测试
 *
 * @author ruoyi
 */
@Component ("ryTask")
@Slf4j
public class RyTask {



    @Autowired
    private ITGoodOrderService goodOrderService;

    //执行订单过期信息
    public void ryNoParams () {
        System.out.println("执行订单过期信息开始");
        this.goodOrderService.updateOrderOverdueDeteTask();
        System.out.println("执行订单过期信息结束");
    }


    //发送当日邮件
   /* public void execueOrderMailDeteTask () throws IOException {
        this.goodOrderService.execueOrderMailDeteTask();
    }*/

    //执行订单过期信息
    public void updateOrderOverdueDeteTask () {
        System.out.println("updateOrderOverdueDeteTask-执行开始");
        this.goodOrderService.updateOrderOverdueDeteTask();
        System.out.println("updateOrderOverdueDeteTask-执行结束");
    }


    //发送当日邮件
    public void execueOrderMailDeteTask () throws IOException {
        System.out.println("execueOrderMailDeteTask-执行开始");
        this.goodOrderService.execueOrderMailDeteTask();
        System.out.println("execueOrderMailDeteTask-执行结束");
    }


}
